<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var username=prompt("请输入用户名:");
if(username.length<3||username.length>10){
    alert("用户长度在3~10范围内");
}else if(username.toLocaleUpperCase().indexOf('admin')!==-1){
    alert('用户名中不能包含敏感词:admin');
}else {
    alert("恭喜你,该用户可以使用")
}
</script>